import service from '../internal/service'

// 登录接口
export function APIGmallLogin ({username, password}) {
  const data = {
    username,
    password
  }
  return service({
    url: '/api/auth/login',
    method: 'post',
    data
  })
}

// 登出接口
export function APIGmallLogout () {
  return service({
    url: '/api/auth/logout',
    method: 'post'
  })
}

// 当前用户信息接口
export function APIGmallUserInfo () {
  return service({
    url: '/api/auth/user',
    method: 'get'
  })
}

export function APIGetMallInfo (shopId) {
  return service({
    url: `/api/shops/${shopId}`,
    method: 'get'
  })
}
